﻿<Window x:Name="window" x:Class="Guitar.MainWindow"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:local="clr-namespace:Guitar"
    xmlns:customControl="clr-namespace:Guitar.CustomControls"
        xmlns:PresentationOptions="http://schemas.microsoft.com/winfx/2006/xaml/presentation/options" 
   
    Title="Master Guitar Reader" Height="600" Width="900"  MinHeight="500" MinWidth="730" 
    Loaded="OnLoaded"  Background="#00A31515" WindowStyle="ThreeDBorderWindow" ResizeMode="CanResizeWithGrip" 
    Icon="/Guitar;component/Images/ic/agt_mp3-256.png" KeyDown="window_KeyDown">



    <DockPanel Name="PanneauPrincipal" PresentationOptions:Freeze="True">
            <!-- La bordure est utilisé pour calculé le rendu avec les marges.
           le contenu de topBar sera affficher avec l'effet glass Aero -->
            <Border Name="topBar" DockPanel.Dock="Top" >

                <!-- on pose le ruban-->
                <Grid>
                 <local:Rubban  x:Name="Menu" /> 

                    <Button  Height="20" HorizontalAlignment="Right" VerticalAlignment="top" Margin="0,1,116,0" Name="button_fullScreen"  Width="23" Click="button_fullScreen_Click" BorderThickness="0" BorderBrush="{x:Null}" Padding="0">
                        <Image Height="20" Width="20" Source="/Guitar;component/Images/ic/agt_add-to-desktop-256.png" ToolTip="Plein écran"></Image>
                        <Button.Background>
                            <LinearGradientBrush EndPoint="1,0.5" StartPoint="0,0.5">
                                <GradientStop Color="#00539696" Offset="0" />
                                <GradientStop Color="#574CEFEF" Offset="1" />
                            </LinearGradientBrush>
                        </Button.Background>
                    </Button>
                </Grid>

            </Border>
            <Grid DockPanel.Dock="Top">
            <Grid.ColumnDefinitions>
                    <ColumnDefinition Width="92" />
                <ColumnDefinition Width="786*" />
                </Grid.ColumnDefinitions>

            <ScrollViewer  PresentationOptions:Freeze="True"  MouseEnter="panelLecteur_MouseEnter" MouseLeave="panelLecteur_MouseLeave"    Background="{x:Null}"  HorizontalScrollBarVisibility="Auto" AllowDrop="False" CanContentScroll="True" VerticalScrollBarVisibility="Auto" Grid.Column="1" Margin="0,0,5,0" PreviewMouseLeftButtonDown="zoomSlider_PreviewMouseButtonClick" PreviewMouseLeftButtonUp="zoomSlider_PreviewMouseButtonUp">
                <Grid Name="Conteneur" PresentationOptions:Freeze="True"  >

                    <Grid.LayoutTransform>

                                    <ScaleTransform 
                            ScaleX="{Binding Path=Value, ElementName=zoomSlider}"
                            ScaleY="{Binding Path=Value, ElementName=zoomSlider}"/>

                    </Grid.LayoutTransform>
                  
                

                </Grid>

                        </ScrollViewer>
                   



                <Grid Grid.Column="1" HorizontalAlignment="Center" VerticalAlignment="Center" Margin="410,518,376,20"></Grid>
                <StackPanel Grid.Column="1" HorizontalAlignment="center"  Name="panelLecteur" VerticalAlignment="Bottom" Margin="346,0,314,18" Orientation="Horizontal" Opacity="0.2"  Width="Auto" MouseEnter="panelLecteur_MouseEnter" MouseLeave="panelLecteur_MouseLeave">

                    <Button  Content="◄◄" Foreground="#FFF8F8F8" Height="28" Name="button7" Template="{StaticResource BoutonRond}" VerticalAlignment="Center" Width="47" Click="AutoPreviousClick" HorizontalAlignment="Center" />
                    <Button Height="32" Name="button5" VerticalAlignment="Center" Width="32" BorderBrush="{x:Null}" Foreground="{x:Null}"  HorizontalAlignment="Center"  BorderThickness="0" Padding="0" Template="{StaticResource BoutonRond}" Click="button5_Click"/>
                    <Button BorderBrush="#FF0A0606" Content="►►" Foreground="#FFF8F8F8" Height="28" Name="button6" Template="{StaticResource BoutonRond}" VerticalAlignment="Center" Width="47" Click="AutoNextClick" HorizontalAlignment="Center" />

                </StackPanel>
                
                    <Label Content=" 130%" Foreground="White" Height="30" FontWeight="Bold"  HorizontalAlignment="Center" Name="labelZoomValue" VerticalAlignment="Top" Margin="27,155,0,0" FontSize="16" Width="54" HorizontalContentAlignment="Center" Padding="2" />
                    <Slider  x:Name="zoomSlider" Minimum="0.1" Maximum="5" Value="0.5" Orientation="Vertical" HorizontalAlignment="Center" VerticalAlignment="Top" Width="20" ValueChanged="zoomSlider_ValueChanged" Height="150" HorizontalContentAlignment="Center" Template="{StaticResource VerticalSlider}" Margin="36,5,36,0" PreviewMouseLeftButtonDown="zoomSlider_PreviewMouseButtonClick" PreviewMouseLeftButtonUp="zoomSlider_PreviewMouseButtonUp" ToolTip="Zoom sur la partition" />
                    <Image Height="32" HorizontalAlignment="Left"  Stretch="Fill" VerticalAlignment="Top" Width="32" Source="/Guitar;component/Images/ic/demo-256.png" Margin="0,151,0,0" />
               
                <Button ToolTip="Mode Livre"  Foreground="#FFF8F8F8" Height="26" HorizontalAlignment="Center" Margin="0,0,46,4" Name="buttonVueLivre" Template="{StaticResource BoutonRond}" VerticalAlignment="Bottom" Width="45" Click="buttonVueLivre_Click" IsEnabled="False">
                    <Image Source="/Guitar;component/Images/ic/contents-256.png"></Image>
                </Button>
                <Button ToolTip="Mode Page"   Foreground="#FFF8F8F8" Height="26" HorizontalAlignment="Center" Margin="45,0,0,4" Name="buttonVuePage" Template="{StaticResource BoutonRond}" VerticalAlignment="Bottom" Width="45" Click="buttonVuePage_Click">
                    <Image Source="/Guitar;component/Images/ic/editcopy-256.png"></Image>
                </Button>
                <Image HorizontalAlignment="Left" Margin="0,221,0,0" Name="image1"  VerticalAlignment="Top" Width="32" />
              <!-- Zone de défilement des pistes -->

                <ScrollViewer VerticalScrollBarVisibility="Hidden" HorizontalScrollBarVisibility="Hidden"    Name="ScrollPiste"  HorizontalAlignment="Left"  VerticalAlignment="Top" Width="100" Height="180" Grid.ColumnSpan="2" MouseEnter="ScrollViewer_MouseEnter" MouseLeave="ScrollViewer_MouseLeave" Margin="0,221,0,0"> 
                <StackPanel ScrollViewer.VerticalScrollBarVisibility="Visible" CanVerticallyScroll="True"  Height="180" Grid.Row="2" Grid.ColumnSpan="2" Name="ScollTest" ToolTip="Gestionnaire de Piste">

                </StackPanel>
              </ScrollViewer>
            <Grid.Background>
                    <LinearGradientBrush EndPoint="1,0.5" StartPoint="0,0.5">
                        <GradientStop Color="#FF555353" Offset="0" />
                        <GradientStop Color="#FFBAB8B8" Offset="0.547" />
                    <GradientStop Color="#FF555353" Offset="1" />
                    </LinearGradientBrush>
                </Grid.Background>
            </Grid>

        </DockPanel>
        

   



    <Window.CommandBindings>
        <CommandBinding 
            Command="local:MainWindow.OptionCommand"
                   CanExecute="OptionCommandCanExecute"
                   Executed="OptionCommandExecuted"/>

        <CommandBinding 
            Command="local:MainWindow.NouveauCommand"
                   CanExecute="NouveauCommandCanExecute"
                   Executed="NouveauCommandExecuted"/>

        <CommandBinding 
            Command="local:MainWindow.OuvrirCommand"
                   CanExecute="OuvrirCommandCanExecute"
                   Executed="OuvrirCommandExecuted"/>

        <CommandBinding 
            Command="local:MainWindow.EnregistrerSousCommand"
                   CanExecute="EnregistrerSousCommandCanExecute"
                   Executed="EnregistrerSousCommandExecuted"/>
        <CommandBinding 
            Command="local:MainWindow.EnregistrerCommand"
                   CanExecute="EnregistrerCommandCanExecute"
                   Executed="EnregistrerCommandExecuted"/>
        <CommandBinding 
            Command="local:MainWindow.ImprimerCommand"
                   CanExecute="ImprimerCommandCanExecute"
                   Executed="ImprimerCommandExecuted"/>
        <CommandBinding 
            Command="local:MainWindow.QuitterCommand"
                   CanExecute="QuitterCommandCanExecute"
                   Executed="QuitterCommandExecuted"/>


    </Window.CommandBindings>

</Window>